#!/bin/sh

SCRIPTS_DIR="../scripts/"

echo
kldstat | grep if_em > /dev/null 
if [ $? -eq 0 ]
then 
	echo "Unload module"
	kldunload if_em.ko
	sleep 1
fi
echo
echo "Build, install  and load generic em driver"
${SCRIPTS_DIR}/generic_build && kldload if_em.ko

sleep 2

echo "Set BPF-Buffer size to 10MB:"
sysctl -w net.bpf.bufsize=10485760
sysctl -w net.bpf.maxbufsize=10485760
